package com.yd.location.module.cms.domain;

import com.baomidou.mybatisplus.annotation.TableName;
import com.yd.location.auth.domain.User;
import com.yd.location.common.spring.mpbase.MyEntity;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.Getter;

import javax.persistence.Entity;
import javax.persistence.Index;
import javax.persistence.Table;

/**
 * @author Created by zk on 2020-07-14 20:23
 * @description 好友消息
 */
@Data
@Entity
@EqualsAndHashCode(callSuper = true)
@TableName("cms_friend_notice")
@Table(name = "cms_friend_notice", indexes = {@Index(name = "idx_user", columnList = "toUserId")})
public class FriendNotice extends MyEntity {

    @Getter
    @AllArgsConstructor
    public enum FriendNoticeType {
        ADD(1, "添加好友"),
        FRIEND(2, "好友消息"),;
        private Integer code;
        private String status;
    }
    private String phone = "";//用于预添加时记录添加的手机号
    private String content;//内容
    private String toUserId;//通知用户
    private String fromUserId;//来自用户
    private Integer type;//消息类型
    private Integer readFlag = 0;//是否已读标志 0-未读 1-已读
    private Integer acceptFlag;//0-等待(发起方等待状态，无任何动作) 1-处理中(接收方处理状态，可选择同意拒绝) 2-已接受 3-已拒绝
    private String userName = "";//对方的昵称
    private String avatar = "";//对方的头像
}
